package com.zbkj.crmeb.task.plat.poizon.enums;

/**
 * @author Zhangxuyang
 * @date 2024/5/31 17:08
 */
public enum TikTokMerShopIdEnum {
    MER_150(150,66820922L),
    MER_18(0,16243669L),

    ;
    private final Integer merId;
    private final Long shopId;

    TikTokMerShopIdEnum(Integer merId, Long shopId) {
        this.merId = merId;
        this.shopId = shopId;
    }

    public Integer getMerId() {
        return merId;
    }

    public Long getShopId() {
        return shopId;
    }

    public static Long getShopIdByMerId(Integer merId) {
        for (TikTokMerShopIdEnum value : TikTokMerShopIdEnum.values()) {
            if (value.getMerId().equals(merId)) {
                return value.getShopId();
            }
        }
        return 16243669L;
    }

    public static Integer getMerIdByShopId(Long shopId) {
        for (TikTokMerShopIdEnum value : TikTokMerShopIdEnum.values()) {
            if (value.getShopId().equals(shopId)) {
                return value.getMerId();
            }
        }
        return null;
    }
}
